package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.family.LoanWholeSaleCommentService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.LoanWholeSaleCommentSearchRequest;
import com.tuanzi.loan.vo.response.family.LoanWholeSaleCommentSearchResponse;
import org.springframework.data.domain.Page;

public class LoanWholeSaleCommentLazyDataModel extends
        BaseLazyDataModel<LoanWholeSaleCommentSearchRequest, LoanWholeSaleCommentSearchResponse> {
    private LoanWholeSaleCommentService loanWholeSaleCommentService = SpringContextHolder.getBean(LoanWholeSaleCommentService.class);

    public LoanWholeSaleCommentLazyDataModel(LoanWholeSaleCommentSearchRequest request) {
        super(request);
    }

    @Override
    protected Page<LoanWholeSaleCommentSearchResponse> doLoad(PageSearcher<LoanWholeSaleCommentSearchRequest> pageSearcher) {
        return loanWholeSaleCommentService.list(pageSearcher);
    }
}
